﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy.Core.Common;
using FortuneHeavenCommon.DataMap;

namespace FortuneHeavenDAL
{
    public class IPRecordDAL : BaseDAL
    {
        public IPRecord GetIPRecord(float ip)
        {
            string sql = "select * from ip where StartIP<=@p0 and EndIP>=@p0";
            List<IPRecord> records = dbOper.Query<IPRecord>(sql, ip);
            if (records != null && records.Count > 0)
            {
                return records[0];
            }
            return null;
        }
    }
}
